﻿#pragma once
#include "BaseMessage.h"
#include "../../3rd/libjson/json.h"
class CGeneralJsonStringRet :
	public BaseMessage
{
public:
	CGeneralJsonStringRet(uint32_t uid, uint32_t pn);
	~CGeneralJsonStringRet(void);

public:
	//---------------------------------------------------------------------------
	static BaseMessage* Create(uint32_t uid, uint32_t pn)
	{
		return new CGeneralJsonStringRet(uid, pn);
	}

public:
	virtual void HandleMessage(Player* pplayer) override final
	{}

	void Clear();

	void SetProtocolNumber(uint32_t pn);

	void SetJsonData(const char* key, uint16_t val);
	void SetJsonData(const char* key, int16_t val);
	void SetJsonData(const char* key, uint32_t val);
	void SetJsonData(const char* key, int32_t val);
	void SetJsonData(const char* key, const char* val);
	void SetJsonData(const char* key, double val);
	void SetJsonData(const char* key, Json::Value val);
	void SetJsonData(const char* key, std::wstring val);
	void SetJsonData(const char* key, const wchar_t* val);
};

